package com.youlai.eng.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.*;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.io.Serializable;
import java.util.Date;

/**
 * (bee_eng_emp)实体类
 *
 * @author xiamw
 * @since 2023-12-22 19:59:55
 * @description
 */
@Schema(description ="工程计划员表实体对象")
@Data
@Entity
@EntityListeners(AuditingEntityListener.class)
@Table(name = "bee_eng_buyer", schema = "youlai_boot", catalog = "")
public class EngBuyerEntity implements Serializable {
    @Transient
    private static final long serialVersionUID = 1L;

    @Schema(description ="主键ID")
    @Id
    @Column(name = "eng_buyer_id", unique = true)
    private Long id;

    @Schema(description ="人员编号")
    private String buyerNo;

    @Schema(description ="人员姓名")
    private String buyerName;

    //公共属性
    @Schema(description ="排序")
    private Integer sort;

    @Schema(description ="状态(1:正常;0:禁用)")
    private Integer status=1;

    @Schema(description ="备注")
    private String remark;

    @Schema(description ="逻辑删除标识(0:未删除;1:已删除)")
    private Integer deleted=0;

    @JsonInclude(value = JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @CreatedDate
    @Temporal(TemporalType.TIMESTAMP)
    private Date createTime;
    private Long createBy;
    private String createName;

    private Long updateBy;
    @JsonInclude(value = JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @LastModifiedDate
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateTime;
    private String updateName;

}